package org.jeecg.cn.edu.scau.vm.job;

import org.jeecg.cn.edu.scau.vm.container.service.VmContainerUsageService;
import org.jeecg.cn.edu.scau.vm.machineTime.service.IVmUserSettingsService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jetbrains.annotations.NotNull;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import javax.annotation.Resource;

/**
 * 刷新机时任务
 */
public class FlushMachineTimeJobs extends QuartzJobBean {
    private static final Logger logger = LoggerFactory.getLogger(FlushMachineTimeJobs.class);
    @Resource
    private ISysUserService userService;
    @Resource
    private IVmUserSettingsService userSettingsService;
    @Resource
    private VmContainerUsageService vmContainerUsageService;

    @Override
    protected void executeInternal(@NotNull JobExecutionContext context)
            throws JobExecutionException {
        vmContainerUsageService.syncData();
    }
}
